package sy.service.impl;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import sy.dao.GifDaoI;
import sy.model.Taskrecord;
import sy.model.Tgif;
import sy.pageModel.Mgif;
import sy.service.GifServiceI;
@Service
public class GifServiceImpl implements GifServiceI {
	@Autowired
	private GifDaoI gifDao;
	@Override
	public void add(Mgif gif) throws Exception {
		/*Tgif u = new Tgif();
		u.setId(UUID.randomUUID().toString());
		u.settime(new Date());
		u.setUserid(gif.getUserid());
		u.setScore(2000);
		gifDao.save(u);*/
		
	}
	@Override
	public Tgif gifdetial(Integer lev) throws Exception {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("lev", lev);
		Tgif t = gifDao.get("from Tgif t where  t.lev = :lev", params);
		return t;
	}
}
